package com.lh.java.basic.datatype;

public class TestObject2 {

	public static void main(String[] args) {
	Object ob3 = new Object();
	Person n =new Person() ; 
	
	Class<? extends Person> c = n.getClass(); 
	try {
		c.newInstance().setName("5");
		System.out.println(c);
	} catch (InstantiationException e) {
		System.out.println("InstantiationException");
		e.printStackTrace();
	} catch (IllegalAccessException e) {
		System.out.println("IllegalAccessException");
		e.printStackTrace();
	}
	try {
		Person b = (Person) n.clone();
		b.setName("55");
		System.out.println(b);
	} catch (CloneNotSupportedException e) {
		
		e.printStackTrace();
	}
	}
	

}
